<?php
namespace backend\logic;
class AppLogic {
    /**
     * 根据appid查询数据对象
     * @param   string $appid 应用唯一标识
     * @return  array                   数据对象
     */
    public function getAppFindBuyAppid($appid){
        $app = new \backend\model\App;
        
        return $app::where('app_id', $appid)->find();
    }
    
    /**
     * 根据appid查询数据对象
     * @param   string $appid 应用唯一标识
     * @return  array                   数据对象
     */
    public function saveAppFind(){
        $app = new \backend\model\App;
        $app->app_name = "测试1";
        $app->save();
        
        return $app;
    }
}